#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QMouseEvent>
#include <QLabel>
#include <QString>
#include <QToolButton>

#define TOPBK_PATH ":/png/img/topBK.jpg"
#define LINE_PATH ":/png/img/line.jpg"
#define BT_NEXT_PATH ":/png/img/next.png"
#define BT_PLAY_PATH ":/png/img/play.png"
#define BT_PREV_PATH ":/png/img/prev.png"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    Ui::MainWindow *ui;

private:
    void InitUI();
    void InitData();

    void SetWindowCloseAndMax();

    bool LoadImg(const QString & qstrFileName, QLabel * pLabel);

    bool LoadImgBt(const QString & qstrFileName, const QSize & qSwh, QToolButton * pBt);

protected:
    void mousePressEvent(QMouseEvent *pEvent);
    void mouseMoveEvent(QMouseEvent *pEvent);
    void mouseReleaseEvent(QMouseEvent *pEvent);

private slots:
    void Close();
    void Min();
    void Max();

    void on_prevBt_clicked();
    void on_playBt_clicked();
    void on_nextBt_clicked();

private:
    bool m_bDrag;
    QPoint m_pos;
};

#endif // MAINWINDOW_H
